/*
 * @copyright   Copyright (C) 2010-2021 Combodo SARL
 * @license     http://opensource.org/licenses/AGPL-3.0
 */

/* SCSS variables */
$ibo-popover-menu--background-color: $ibo-color-white-100 !default;
$ibo-popover-menu--border-radius: $ibo-border-radius-300 !default;
$ibo-popover-menu--padding: 0 !default;

$ibo-popover-menu--toggler-visual-hint--margin-left: 0.5rem !default;

$ibo-popover-menu--section-border-radius: $ibo-popover-menu--border-radius !default;

.ibo-popover-menu {
  display: none;
  padding: $ibo-popover-menu--padding;
  background-color: $ibo-popover-menu--background-color;
  @extend %ibo-elevation-300;
  border-radius: $ibo-popover-menu--border-radius;
  flex-wrap: wrap;
  position: absolute;

  &.ibo-is-opened{
    display: flex;
    flex-direction: column;
  }
}

.ibo-popover-menu--toggler-visual-hint {
  margin-left: $ibo-popover-menu--toggler-visual-hint--margin-left;
}

.ibo-popover-menu--section {
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  margin: 0px 0px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden; /* To avoid first/last entries of the menu to have no border-radius on hover */

  &:first-child {
    border-radius: $ibo-popover-menu--section-border-radius $ibo-popover-menu--section-border-radius 0 0;
  }

  &:last-child {
    border-radius: 0 0 $ibo-popover-menu--section-border-radius $ibo-popover-menu--section-border-radius;
  }
}